#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	reverse(s.begin(), s.end());
	string t;
	getline(cin, t);
	for(int i = 0;i < t.size();i++)
		if('A' <= t[i] && t[i] <= 'Z')
			t[i] = s[t[i]-'A'];
	cout<<t;
	return 0;
}

